﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ApplicationListModule.ascx.cs" 
    Inherits="ChapterX.Modules.ApplicationListModule" %>

<%@ Import Namespace="ChapterX.BusinessFacade" %>
<%@ Import Namespace="ChapterX.Common" %>

<div id="application-list-module">
<asp:HiddenField ID="hf_DigiStatus" runat="server" />
<asp:Repeater ID="ApplicationList" runat="server" 
        onitemdatabound="ApplicationList_ItemDataBound" 
        onitemcommand="ApplicationList_ItemCommand">
    <HeaderTemplate>
        <table class="data-list">
        <thead>
            <tr>
                <td>题名</td>
                <td>ISBN</td>
                <td>申请状态</td>
                <td>操作</td>
            </tr>
        </thead>
        <tbody>
    </HeaderTemplate>
    <ItemTemplate>
            <tr>
                <td><asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Utils.FilterHtml(Eval("Title").ToString()) %>' NavigateUrl='<%# String.Format(
                    "{0}?{1}={2}", DataNavigateUrl, QueryKeys.BOOK_ID, Eval("BookId")) %>'></asp:HyperLink></td>
                <td><%# Eval("ISBN") %></td>
                <td><%# CommonDefinition.getStringDigitizationStatus(Int32.Parse(Eval("DigitizationStatus").ToString()))%></td>
                <td>
                    <asp:HiddenField ID="hf_DigStatus" runat="server" Value='<%# Eval("DigitizationStatus") %>' />
                    <asp:HiddenField ID="hf_BookId" runat="server" Value='<%# Eval("BookId") %>' />
                    <asp:Button ID="button_Operation" runat="server" />
                </td>
            </tr>
    </ItemTemplate>
    <FooterTemplate>
        </tbody>
        </table>
    </FooterTemplate>
</asp:Repeater>
</div>